Skip to content

Fixes #21658: Fix OpenAPI schema for available-prefixes endpoint request body#21956

Merged
jnovinger merged 1 commit intonetbox-community:mainfrom
attoba:fix-available-prefixes-schema
Apr 20, 2026
Merged

Fixes #21658: Fix OpenAPI schema for available-prefixes endpoint request body#21956
jnovinger merged 1 commit intonetbox-community:mainfrom
attoba:fix-available-prefixes-schema

Conversation

@attoba
Copy link
Copy Markdown
Contributor

@attoba attoba commented Apr 18, 2026

Fixes: #21658

Summary

The available-prefixes endpoint correctly validates input using PrefixLengthSerializer, which expects a prefix_length field.

However, the OpenAPI schema incorrectly documents the request body using PrefixSerializer, which leads to a mismatch between the API documentation and the actual behavior.

This change updates the OpenAPI schema to use PrefixLengthSerializer, aligning the documentation with the implemented API behavior.

@pheus pheus requested review from a team and jnovinger and removed request for a team April 20, 2026 10:53
Copy link
Copy Markdown
Member

@jnovinger jnovinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @attoba

@jnovinger jnovinger merged commit a372f78 into netbox-community:main Apr 20, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAPI Spec / swagger docs: POST /api/ipam/prefixes/{id}/available-prefixes/ requestBody is incorrect

2 participants